﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Shop_Phone.COMM;

namespace Shop_Phone
{
    public partial class Detail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack && Visible &&
                !string.IsNullOrEmpty(Request.QueryString["ID"]))
            {
                EndUser vcontrol = new EndUser();
                string errMeg = string.Empty;
                rptchitietsanpham.DataSource = vcontrol.getby_chitiet_sanpham(Request.QueryString["ID"], ref errMeg);
                rptchitietsanpham.DataBind();
            }
        }
        public string tinhtranghang(object trangthai)
        {
            if (Convert.ToInt32(trangthai) > 0)
            {
                return "Còn hàng";
            }
            else
            {
                return "Hết hàng";
            }
        }
    }
}